#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
using namespace std;
#include "vector.h"

namespace lsnm {
	/*void vector_test1() {
		vector<int> v1;
		v1.push_back(1);
		v1.push_back(2);
		v1.push_back(3);
		v1.push_back(4);
		cout << v1[1] << endl;
	}*/
	void vector_test2() {
		vector<int> v1;
		v1.push_back(1);
		v1.push_back(2);
		v1.push_back(3);
		v1.push_back(4);
		vector<int>::iterator it2 = find(v1.begin(), v1.end(), 3);
		cout << *(it2) << endl;
	}
	void vector_test3() {
		//
	}
	void vector_test_7_14() {
		string s1("qwebn");
		string s2("qwrqw");
		string s3("qwtaasd");
		string s4("qwfy");
		string s5("qwfygg");
		string s6("qdfgdfhghyjwfy");
		vector<string> v2;
		v2.push_back(s1);
		v2.push_back(s2);
		v2.push_back(s3);
		v2.push_back(s4);
		v2.push_back(s4);
		for (auto e : v2) {
			cout << e << " ";
		}
		cout << endl;
	}

	void vector_test_7_15() {
		string s1("qwerdfzxcvbnnm");
		vector<char> v1(s1.begin()+1, s1.end());
		list<int> li1{ 1,2,3,4,5 };
		vector<int> v2(li1.begin(), li1.end());
		for (auto e : v2) {
			cout << e << " ";
		}
		cout << endl;
	}
	
	void vector_test_4() {
		vector<int> v1(10);
		vector<int> v2(10 ,1);
		vector<int> v3{ 1,2,3,4,5 };
		for (auto e : v3) {
			cout << e << " ";
		}
		cout << endl;
	}
}

void test_2() {
	std::vector<int>  v1{1, 2, 3, 4,33,34,67,8,9,345};
	std::vector<int>::iterator it = v1.begin();
	vector<int>::iterator re = find(v1.begin(), v1.end(), 345);
	cout << *re<<endl;
	re = v1.erase(re);
	for (auto e : v1) {
		cout << e << " ";
	}
	if(re!=v1.end())
	cout <<endl<< *re << endl;
	
}

void test_3() {
	vector<int> v1{ 1,2,3,4,5 };
	vector<int>::iterator it1 = v1.begin();
	while (it1 != v1.end()) {
		if (*it1 % 2 == 0) {
			it1 = v1.erase(it1);
		}
		else {
			++it1;
		}
	}
	for (auto e : v1) {
		cout << e << " ";
	}
	cout << endl;
}


void vector_test_13() {
	vector<int> v1;
	v1.insert(v1.begin(), 3);
	cout << *v1.begin();
}

int main() {
	//lsnm::vector_test1();
	//test_3();
	//lsnm::vector_test3();
	//lsnm::vector_test_7_14();
	//lsnm::vector_test_4();
	vector_test_13();
	return 0;
}